// pages/my/vip/vip_invitation/component/dialogBox/dialogBox.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    shareData: {}
  },

  /**
   * 组件的初始数据
   */
  data: {
    num: '',
    data:{}
  },
  observers: {
    'shareData': function (val) {
      this.setData({
        data:val
      })
    }
  },
  /**
   * 组件的方法列表
   */
  methods: {
    closeDialog() {
      this.triggerEvent('closeDialog')
    },
    inputNum(e) {
      this.setData({
        num: e.detail.value
      })
    }
  },
  onShareAppMessage(e) {
    let {
      invitationId,
      invitationAccountId,
      title
    } = this.data.data
    console.log(this.data.data,this.data.num);
    wx.updateShareMenu({
      withShareTicket: true,
      isPrivateMessage: true,
      activityId: invitationAccountId,
    })
    this.triggerEvent('closeDialog')
    return {
      title,
      path: '/pages/my/vip/vip_invitation/vip_invitation_share/index?invitationId=' + invitationId + '&invitationAccountId=' + invitationAccountId+'&num='+this.data.num,
      imageUrl: "/assets/my/img/invitation_4.jpg",
    }
  }
})